#coding:utf-8

from selenium import webdriver

class BasePage:
    # 构造函数
    def __init__(self, driver):
        self.driver = driver
    

    def find_element(self, locators):
        ele = self.driver.find_element(*locators)
        return ele

    def click(self,ele):
        self.find_element(ele).click()  
    
    def input(self,ele,text):
        self.find_element(ele).send_keys(text)


    def open(self):
        self.driver.get(self.url)

    def quit(self):
        self.driver.quit()